<?php

// If this file is called directly, busted!
if( !defined( 'ABSPATH' ) ) {
    exit;
}

/*----------------------------------------------------------------------------------------------------------
    BLOG VIEW - standard blog "latest posts" view
-----------------------------------------------------------------------------------------------------------*/

get_header(); ?>
<?php
$td_trimmed_title_blog = 20; // gameleon_get_option( 'td_blog_title_trim' );
?>

<div id="main-wrapper" class="td-blog-layout-home grid col-700">

<div class="td-content-inner">

<div class="td-wrap-content">

	<?php if( have_posts() ) : ?>
	<?php while( have_posts() ) : the_post(); ?>

<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="post-entry">
<div class="td-fly-in">

<h3 class="entry-title">
<a href="<?php echo get_permalink(); ?>" title="<?php echo get_the_title(); ?>">
<?php echo wp_trim_words( get_the_title(), $td_trimmed_title_blog ); ?>
</a>
</h3>

<?php get_template_part( 'post-single-meta' ); ?>

<div class="post-entry">
			<?php if ( '' != get_the_post_thumbnail() ) : // if( has_post_thumbnail() ) ?>
			<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
				<?php the_post_thumbnail(); ?>
			</a>
		<?php endif; ?>
<?php the_content( __( 'Read More...', 'gameleon' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="pagination">' . __( 'Pages:', 'gameleon' ), 'after' => '</div>' ) ); ?>
	</div><?php // end of .post-entry / ?>


</div><?php // end of td-fly-in ?>
</div><?php // end of post-entry ?>
</div><?php // end of #post id ?>



</div><?php // end of td-wrap-content / ?>
</div><?php // end of td-content-inner / ?>

<?php
// ----------- pagination
// ---------------------------------------------------------------------------
?>

<?php
endwhile;
get_template_part( 'loop-nav' );
else :
	get_template_part( 'loop-no-posts' );
endif;
?>

</div><?php // end of main-wrapper ?>

<?php get_sidebar(); ?>
<?php get_footer(); ?>